//
//  AXMYCouponViewController.m
//  AnXin100
//
//  Created by Sakura on 2018/11/13.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXMYCouponViewController.h"
#import "AXMYCouponTableViewCell.h"
@interface AXMYCouponViewController ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *mainTable;
@end

@implementation AXMYCouponViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.mainTable];
    
}


#pragma lazy load
- (UITableView *)mainTable {
    if (!_mainTable) {
        _mainTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, Hi-Hn-44) style:UITableViewStylePlain];
        _mainTable.delegate = self;
        _mainTable.dataSource = self;
        _mainTable.separatorStyle = UITableViewCellSeparatorStyleNone;
        [_mainTable registerNib:[UINib nibWithNibName:@"AXMYCouponTableViewCell" bundle:nil] forCellReuseIdentifier:@"AXMYCouponTableViewCell"];
    }
    return _mainTable;
}

#pragma mark - UITableView Delegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 2;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 120;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    AXMYCouponTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AXMYCouponTableViewCell"];
    return cell;
}


@end
